<include file="public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="public/breadcrumb"/>
    <section class="content ">
        <!-- Main content -->
        <div class="container-fluid">

            <div class="panel panel-default">
                <div class="panel-body ">   
                    <!--表单数据-->
                    <form method="post" id="handle_shop">

                        <!--通用信息-->
                    <div class="tab-content col-md-10">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody>
                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>类型：</td>
                                    <td class="col-sm-8">
                                        <select class="form-control" id="types" name="types">
                                            <option value="1">虚拟卡</option>
                                            <option value="2">实体卡</option>
                                        </select>
                                    </td>
                                </tr>
<!--                                <tr class="yt">-->
<!--                                    <td class="col-sm-2"><span style="color:#F00;">*</span>用途：</td>-->
<!--                                    <td class="col-sm-8">-->
<!--                                        <select class="form-control" id="useTo" name="useTo">-->
<!--                                            <option value="">==请选择用途==</option>-->
<!--                                            <option value="1">赠送</option>-->
<!--                                            <option value="2">商品</option>-->
<!--                                        </select>-->
<!--                                    </td>-->
<!--                                </tr>-->
                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>面额：</td>
                                    <td class="col-sm-8">
                                        <select class="form-control" name="denomination">
                                            <option value="">==请选择面额==</option>
                                            <option value="1000">1000</option>
                                            <option value="2000">2000</option>
                                            <option value="5000">5000</option>
                                            <option value="10000">10000</option>
                                        </select>
                                    </td>
                                </tr>
<!--                                <tr class="sf">-->
<!--                                    <td class="col-sm-2"><span style="color:#F00;">*</span>实付：</td>-->
<!--                                    <td class="col-sm-8">-->
<!--                                        <input type="text" class="form-control" name="substantialCharge" placeholder="请输入实际支付">-->
<!--                                    </td>-->
<!--                                </tr>-->
                                <tr class="mo">
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>用户电话：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="userMobile" placeholder="请输入给予用户的电话">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>生成数量：</td>
                                    <td class="col-sm-8">
                                        <input type="number" class="form-control" name="number" placeholder="请输入生成的数量" value="1">
                                    </td>
                                </tr>
                                </tbody> 
                                <tfoot>
                                	<tr>
                                        <td></td>
                                	    <td class="text-right"><input class="btn btn-primary" type="button" onclick="shop_submit()" value="保存"></td>
                                    </tr>
                                </tfoot>                               
                            </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>

    $(document).ready(function (){
        $('#types').bind('change',function (){

            var types = $(this).val();
            if(types == 2){
                $(".mo").hide();
                $(".yt").hide();
                // $(".sf").hide();
            }else {
                $(".mo").show();
                $(".yt").show();
                // $(".sf").show();
            }
        })
        // $('#useTo').bind('change',function (){
        //
        //     var useTo = $(this).val();
        //     if(useTo == 2){
        //         $(".mo").hide();
        //         $(".sf").show();
        //     }else {
        //         $(".mo").show();
        //         $(".sf").hide();
        //     }
        // })
    })





function shop_submit(){
    ajax_form_submit("handle_shop", "{:url('rechargeable/doAdd')}");
}
</script>
 </body>
 </html>